﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="UserMessages.aspx.cs" Inherits="WebClient.UserMessages" %>
    <%@ MasterType VirtualPath="~/Site.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        #TextArea1
        {
            height: 246px;
            width: 894px;
        }
        #MessageArea
        {
            height: 225px;
            width: 894px;
        }
        .style1
        {
            text-decoration: underline;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <h2>
        Messaging
    </h2>
    <asp:UpdatePanel ID="MainUpdatePanel" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <asp:Panel ID="YourMessagesPanel" runat="server" Visible="false">
                
                    <span class="style1">Current Messages</span> :
                    <asp:LinkButton ID="SwitchToCreateMessageButton" runat="server" OnClick="SwitchToCreateMessageButton_Click">Compose New Message</asp:LinkButton>
                
                
                
                <br />
                <asp:GridView ID="MessagesGrid" runat="server" HorizontalAlign="Center" 
                        onrowdatabound="MessagesGrid_RowDataBound" 
                        onrowcommand="MessagesGrid_RowCommand">
                    <Columns>
                        <asp:ButtonField CommandName="Read" Text="Read" />
                    </Columns>
                </asp:GridView>
            </asp:Panel>
            <asp:Panel ID="CreateMessagePanel" runat="server" Visible="true">
                <strong>
                    <span class="style1">Compose New Message</span> :
                    <asp:LinkButton ID="SwitchToViewMessageButton" runat="server" 
                        OnClick="SwitchToViewMessageButton_Click">View Messages</asp:LinkButton>
                        </strong>
                
                    <br />
                    <br />
                    <asp:Label ID="SubjectLabel" runat="server" Text="Subject: "></asp:Label>
                <br />
                <br />
                <asp:TextBox ID="SubjectBox" runat="server" Width="887px"></asp:TextBox>
                
                <asp:Label ID="Recipients" runat="server" Text="Recipients: "></asp:Label>
                <br />
                <br />
                <asp:TextBox ID="RecipientBox" runat="server" Width="887px"></asp:TextBox>
                <br />
                <br />
                <asp:Label ID="Label1" runat="server" Text="Email Recipients: "></asp:Label>
                <br />
                <br />
                <asp:TextBox ID="EmailBox" runat="server" Width="887px"></asp:TextBox>
                <hr />
                Message Body:<br />
                <br />
                &nbsp;<asp:TextBox ID="MessageContent" runat="server" Height="88px" Width="891px"
                    MaxLength="256" TextMode="MultiLine"></asp:TextBox>
                <br />
                <asp:Button ID="SendButton" runat="server" Text="Send Message" Width="104px" 
                    onclick="SendButton_Click" />
            </asp:Panel>
            <div id ="errorPanel">
                    <asp:Panel ID="ErrorPanel" runat="server" Visible="False">
                    <asp:TextBox ID="ErrorText" runat="server" Height="155px" Width="328px" 
                            ForeColor="White" TextMode="MultiLine" BackColor="Black"></asp:TextBox>
                        <br />
                    <asp:Button ID="ErrorClose" runat="server" Text="Close" onclick="ErrorClose_Click"></asp:Button>
                    </asp:Panel>
                </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
